*******************************************************************************************************************************************MANUSCRIPT: Authorized Generic Entry prior to Patent Expiry: Reassessing Incentives for Independent Generic Entry *AUTHOR:     Silvia Appelt, University of Munich, silvia.appelt@lrz.uni-muenchen.de******************************************************************************************************************************************				                         *** NPI DATA PREPARATION (STEP 3 & 4) ***						            		* Date last edit:  11 January 2015 * ******************************************************************************************************************************************   version 13.0set more offcap log closeclear******* Generic Entry and Patent Expiryuse npi_human2.dta, clear**** (III) Drug Markets with LoE and first-time Generic Entry 2002-2007** Identify first-time Generic Entry 2002-2007 ** Date First Generic Entry*Drug Levelsort sub_no date_form_launchby sub_no: egen help=min(date_form_launch) if drug_type=="Generika" & mono_substance==1by sub_no: egen date_first_gentry=min(help)format date_first_gentry %tddrop helpgen date_first_gentry_yr=year(date_first_gentry)** Date First Market Entry (Non-Generic)*Firm Levelby sub_no producer_no, sort: egen help=min(date_form_launch) if drug_type!="Generika" & mono_substance==1by sub_no producer_no, sort: egen date_entry=min(help)format date_entry %tddrop help*Drug Levelsort sub_no date_form_launchby sub_no: egen help=min(date_entry) if drug_type!="Generika" & mono_substance==1by sub_no: egen date_first_entry=min(help)format date_first_entry %tddrop helpgen date_first_entry_yr=year(date_first_entry)** First-Time Generic Entry 2002-2007  local cut_off 15341*January 1st 2002 gen pzn_generic_entry=1 if date_form_launch>=`cut_off' & drug_type=="Generika" & date_first_gentry_yr>=2002 & date_first_gentry_yr!= .egen generic_entry=tag(sub_no producer_no) if pzn_generic_entry==1replace generic_entry= . if generic_entry==0count if pzn_generic_entry==1count if generic_entry==1                          *** Losses of Exclusivity & First-time Generic Entry 2002-2007** Drugs with first time Generic Entry 2002-2007                                  sort sub_noegen sub_no_gentry=group(sub_no) if date_first_gentry_yr>=2002 & date_first_gentry_yr!= .summarize sub_no_gentry*69 substances *Substances with Patent/SPC expiry until 2007    sum sub_no_matchtab substances if sub_no_match!= .*65 substances *Substances with Patent/SPC expiry and GE/NO GE until Dec 31st 2007 (based on patent/spc information and own follow-up research)    gen sub_help= .replace sub_help=sub_id if substances=="Acamprosat" | substances=="Adapalen" | substances=="Alfuzosin" | substances=="Amlodipin" | substances=="Amorolfin" | substances=="Apraclonidin" | substances=="Azithromycin" | substances=="Benazepril" | substances=="Cabergolin" | substances=="Calcipotriol" |substances=="Carmustin" | substances=="Cefpodoxim" | substances=="Ceftibuten" | substances=="Cilazapril" | substances=="Clarithromycin" | substances=="Croconazol" | substances=="Didanosin" | substances=="Ebastin" | substances=="Epoetin alfa" | substances=="Fexofenadin" | substances=="Filgrastim" | substances=="Finasterid" | substances=="Fleroxacin" | substances=="Fosinopril" | substances=="Glimepirid" | substances=="Lacidipin" | substances=="Lamotrigin" | substances=="Lansoprazol" | substances=="Leuprorelin" | substances=="Miglitol" replace sub_help=sub_id if substances=="Miltefosin" | substances=="Molgramostim" | substances=="Nadifloxacin" | substances=="Nafarelin" | substances=="Nefazodon" | substances=="Olanzapin" | substances=="Ondansetron" | substances=="Perindopril" | substances=="Pravastatin" | substances=="Quinagolid" | substances=="Ramipril" | substances=="Risperidon" | substances=="Sertaconazol" | substances=="Sertralin" | substances=="Sevofluran" | substances=="Sumatriptan" | substances=="Tamsulosin" | substances=="Temozolomid" | substances=="Terbinafin" | substances=="Toremifen" | substances=="Trandolapril" | substances=="Tropisetron" | substances=="Zidovudin" replace sub_help=sub_id if substances=="Carvedilol" | substances=="Cefixim" | substances=="Fluconazol" | substances=="Formoterol" | substances=="Itraconazol" | substances=="Lovastatin" | substances=="Meloxicam" | substances=="Moxonidin" | substances=="Pergolid" | substances=="Quinapril" | substances=="Simvastatin" | substances=="Amisulprid" | substances=="Ceftazidim" | substances=="Ceftriaxon" | substances=="Citalopram" | substances=="Flumazenil" | substances=="Gabapentin" | substances=="Granisetron" | substances=="Mirtazapin"  | substances=="Oxycodon" |  substances=="Pamidrons�ure" | substances=="Paclitaxel" | substances=="Prednicarbat" | substances=="Terazosin" | substances=="Torasemid" | substances=="Ganciclovir"  sort sub_helpegen sub_no_gentry_exp=group(sub_no) if sub_id==sub_helpdrop sub_helpsum sub_no_gentry_exptab substances if sub_no_gentry_exp!= .*79 substances (with one active ingredient)*Date Patent/SPC Expiry (based on patent/spc information and own follow-up research) generate help_expiry=expirydateexpected if sub_no_gentry_exp!= .  replace help_expiry="01/03/2004" if substances=="Amlodipin"replace help_expiry="01/04/2006" if substances=="Azithromycin"replace help_expiry="31/03/2006" if substances=="Cabergolin"replace help_expiry="15/11/2004" if substances=="Clarithromycin"replace help_expiry="01/05/2007" if substances=="Finasterid"replace help_expiry="01/09/2005" if substances=="Glimepirid"replace help_expiry="15/05/2005" if substances=="Lamotrigin"replace help_expiry="01/08/2007" if substances=="Leuprorelin"replace help_expiry="04/06/2007" if substances=="Olanzapin"replace help_expiry="01/08/2004" if substances=="Pravastatin"replace help_expiry="01/12/2007" if substances=="Risperidon"replace help_expiry="15/05/2006" if substances=="Sumatriptan"replace help_expiry="01/02/2006" if substances=="Tamsulosin"replace help_expiry="01/08/2005" if substances=="Terbinafin"replace help_expiry="20/05/2003" if substances=="Toremifen"replace help_expiry="07/04/2004" if substances=="Carvedilol"replace help_expiry="01/10/2003" if substances=="Cefixim"replace help_expiry="08/03/2003" if substances=="Fluconazol"replace help_expiry="01/12/2004" if substances=="Formoterol"replace help_expiry="15/12/2003" if substances=="Itraconazol"replace help_expiry="27/06/2003" if substances=="Lovastatin"replace help_expiry="01/08/2005" if substances=="Meloxicam"replace help_expiry="15/11/2003" if substances=="Moxonidin"replace help_expiry="01/01/2004" if substances=="Pergolid"replace help_expiry="14/04/2004" if substances=="Quinapril"replace help_expiry="01/05/2003" if substances=="Simvastatin"replace help_expiry="14/01/2004" if substances=="Amisulprid"replace help_expiry="25/05/2004" if substances=="Ceftazidim"replace help_expiry="01/10/2002" if substances=="Ceftriaxon"replace help_expiry="31/01/2002" if substances=="Citalopram"replace help_expiry="15/08/2005" if substances=="Flumazenil"replace help_expiry="01/06/2003" if substances=="Gabapentin"replace help_expiry="08/10/2006" if substances=="Granisetron"replace help_expiry="01/08/2004" if substances=="Mirtazapin"replace help_expiry="15/02/2007" if substances=="Oxycodon"replace help_expiry="15/09/2002" if substances=="Pamidrons�ure"replace help_expiry="01/05/2004" if substances=="Paclitaxel"replace help_expiry="27/07/2003" if substances=="Prednicarbat"replace help_expiry="01/12/2002" if substances=="Terazosin"replace help_expiry="15/11/2003" if substances=="Torasemid"gen help_expiry_num=date(help_expiry, "DMY") if sub_no_gentry_exp!= .by sub_no_gentry_exp, sort: egen date_expiry=max(help_expiry_num)drop help*format date_expiry %tdgen date_expiry_yr=year(date_expiry)gen date_expiry_month=month(date_expiry)tab date_expiry_yrtab date_expiry_month** Date First Patent Application/Market Approval and Duration Monopoly*First Patent Applicationby sub_no_gentry_exp, sort: egen date_firstpatentappl=min(patentappldate_num) if sub_no_gentry_exp!= .format date_firstpatentappl %td*First Market Approvaltab substances if fma_num== . & sub_no_gentry_exp!= . replace fma_num=date_first_entry if sub_no_gentry_exp!= . & fma_num== .count if fma_num>date_first_entry & sub_no_gentry_exp!= . tab substances if fma_num>date_first_entry & sub_no_gentry_exp!= . *Adapalen, Carmustin, Lamotrigin, Lansoprazol, Perindoprilreplace fma_num=date_first_entry if substances=="Adapalen" | substances=="Lamotrigin" | substances=="Lansoprazol" | substance=="Perindopril"** Effective Duration Monopolygen monopoly_dur=yofd(date_expiry)-yofd(patentappldate_num) if sub_no_gentry_exp!= .gen monopoly_effdur=yofd(date_expiry)-yofd(fma_num) if sub_no_gentry_exp!= .sum monopoly_*dur, d** Limit analysis to drugs with no eye, lung or systemic use: 75 drug marketsgen sub_no_gentry_exp2=sub_no_gentry_expsort sub_no_gentry_expegen help=group(sub_no_gentry_exp) if sub_no_gentry_exp==7 | sub_no_gentry_exp==32 | sub_no_gentry_exp==51 | sub_no_gentry_exp==68sum helpegen help2=group(sub_no_gentry_exp) if sub_no_gentry_exp!= . & help== .sum help2replace sub_no_gentry_exp=help2sum sub_no_gentry_exp*drop help*** Identify independent and authorized generic entry post patent expiry 2002-2007*Generic entry (incl. authoirzed generic entrz but excluding reimport) generate generic_entry_exp=.replace generic_entry_exp=1 if pzn_generic_entry==1 & sub_no_gentry_exp!= . & firm_re_index==0count if date_form_launch== . & generic_entry_exp==1egen gentrant_no=group(producer_no) if generic_entry_exp==1 sum gentrant_no*AG Entry prior to LoE generate ag_entry= .replace ag_entry=0 if generic_entry_exp==1 & date_form_launch>=date_expiryreplace ag_entry=1 if generic_entry_exp==1 & date_form_launch<date_expiry  tab substances if ag_entry==1*Independent Generic Entry [excludes AG Entry but includes reimport] generate ind_generic_entry_exp=generic_entry_expreplace ind_generic_entry_exp=0 if ag_entry==1count if generic_entry_exp==1count if ind_generic_entry_exp==1count if ag_entry==1*AG entrants incorrectly classified as independent generic entrants when entering later on by sub_no_gentry_exp gentrant_no, sort: egen help1=max(ag_entry)by sub_no_gentry_exp gentrant_no, sort: egen help2=max(ind_generic_entry_exp)count if help1==1 & help2==1 & sub_no_gentry_exp!= .egen help3=tag(sub_no_gentry_exp gentrant_no) if help1==1 & help2==1 & sub_no_gentry_exp!= .count if help3==1*13 cases AG entrants also launched retail forms after LoEreplace ind_generic_entry_exp=0 if help1==1 & help2==1 & sub_no_gentry_exp!= . & ind_generic_entry_exp==1replace ag_entry=1 if help1==1 & help2==1 & sub_no_gentry_exp!= . & ag_entry==0drop gentrant_no help*count if generic_entry_exp==1count if ind_generic_entry_exp==1count if ag_entry==1egen help0=group(pzn_id_mod) if generic_entry_exp==1egen help1=group(pzn_id_mod) if ind_generic_entry_exp==1egen help2=group(pzn_id_mod) if ag_entry==1sum help*drop help**6407, 6142, 265** Identification Generic Entrants*Generic Entrantssort producer_noegen gentrant_no=group(producer_no) if generic_entry_exp==1 & firm_re_index==0                       summarize gentrant_no, d  					                     *87 Generic Manufacturers enter markets after patent expiry (no reimport)*First Generic Entrants *Date Generic Entryby sub_no_gentry_exp gentrant_no, sort: egen help=min(date_form_launch) if sub_no_gentry_exp!= . & gentrant_no!= . & generic_entry_exp==1by sub_no_gentry_exp gentrant_no, sort: egen date_gentry=max(help) if sub_no_gentry_exp!= . & gentrant_no!= . format date_gentry %tdcount if date_gentry== . & generic_entry_exp==1egen help1=tag(sub_no_gentry_exp gentrant_no) if generic_entry_exp==1egen help2=tag(sub_no_gentry_exp gentrant_no) if date_gentry!= .count if help1==1count if help2==1drop help**750 generic entries in 75 drug markets**(vii) Patentholder Index [based on Patent/SPC data plus own research] *The patentholder index is defined at parent firm level: overall 33 originators (patentholders/licencees) *It refers to the patentholder and, if not active in the German pharmaceutical market, the licensee selling the drug in Germany. gen patentholder_id= .replace patentholder_id=1000206 if substances=="Acamprosat"replace patentholder_id=1000385 if substances=="Adapalen"replace patentholder_id=1000281 if substances=="Alfuzosin"replace patentholder_id=1000281 if substances=="Amisulprid"replace patentholder_id=1000241 if substances=="Amlodipin"replace patentholder_id=1000385 if substances=="Amorolfin"replace patentholder_id=1000249 if substances=="Azithromycin"replace patentholder_id=1000223 if substances=="Benazepril"replace patentholder_id=1000241 if substances=="Cabergolin"replace patentholder_id=1000179 if substances=="Calcipotriol"replace patentholder_id=1000062 if substances=="Carmustin"replace patentholder_id=1000145 if substances=="Carvedilol"replace patentholder_id=1000353 if substances=="Cefixim"replace patentholder_id=1000279 if substances=="Cefpodoxim"replace patentholder_id=1000122 if substances=="Ceftazidim"replace patentholder_id=1000286 if substances=="Ceftibuten"replace patentholder_id=1000145 if substances=="Ceftriaxon"replace patentholder_id=1000145 if substances=="Cilazapril"replace patentholder_id=1000192 if substances=="Citalopram"replace patentholder_id=1000003 if substances=="Clarithromycin"replace patentholder_id=1000209 if substances=="Croconazol"replace patentholder_id=1000062 if substances=="Didanosin"replace patentholder_id=1000013 if substances=="Ebastin"replace patentholder_id=1000016 if substances=="Epoetin alfa"replace patentholder_id=1000281 if substances=="Fexofenadin"replace patentholder_id=1000016 if substances=="Filgrastim"replace patentholder_id=1000207 if substances=="Finasterid"replace patentholder_id=1000128 if substances=="Fleroxacin"replace patentholder_id=1000241 if substances=="Fluconazol"replace patentholder_id=1000145 if substances=="Flumazenil"replace patentholder_id=1000062 if substances=="Fosinopril"replace patentholder_id=1000241 if substances=="Gabapentin"replace patentholder_id=1000145 if substances=="Ganciclovir"replace patentholder_id=1000281 if substances=="Glimepirid"replace patentholder_id=1000145 if substances=="Granisetron"replace patentholder_id=1000161 if substances=="Itraconazol"replace patentholder_id=1000122 if substances=="Lacidipin"replace patentholder_id=1000122 if substances=="Lamotrigin"replace patentholder_id=1000325 if substances=="Lansoprazol"replace patentholder_id=1000325 if substances=="Leuprorelin"replace patentholder_id=1000207 if substances=="Lovastatin"replace patentholder_id=1000056 if substances=="Meloxicam"replace patentholder_id=1000034 if substances=="Miglitol"replace patentholder_id=1000033 if substances=="Miltefosin"replace patentholder_id=1000286 if substances=="Mirtazapin"replace patentholder_id=1000223 if substances=="Molgramostim"replace patentholder_id=1000184 if substances=="Moxonidin"replace patentholder_id=1000242 if substances=="Nadifloxacin"replace patentholder_id=1000370 if substances=="Nefazodon"replace patentholder_id=1000184 if substances=="Olanzapin"replace patentholder_id=1000122 if substances=="Ondansetron"replace patentholder_id=1000218 if substances=="Oxycodon"replace patentholder_id=1000062 if substances=="Paclitaxel"replace patentholder_id=1000223 if substances=="Pamidrons�ure"replace patentholder_id=1000184 if substances=="Pergolid"replace patentholder_id=1000299 if substances=="Perindopril"replace patentholder_id=1000279 if substances=="Pravastatin"replace patentholder_id=1000281 if substances=="Prednicarbat"replace patentholder_id=1000104 if substances=="Quinagolid"replace patentholder_id=1000241 if substances=="Quinapril"replace patentholder_id=1000281 if substances=="Ramipril"replace patentholder_id=1000161 if substances=="Risperidon"replace patentholder_id=1000103 if substances=="Sertaconazol"replace patentholder_id=1000241 if substances=="Sertralin"replace patentholder_id=1000207 if substances=="Simvastatin"replace patentholder_id=1000122 if substances=="Sumatriptan"replace patentholder_id=1000353 if substances=="Tamsulosin"replace patentholder_id=1000286 if substances=="Temozolomid"replace patentholder_id=1000442 if substances=="Terazosin"replace patentholder_id=1000223 if substances=="Terbinafin"replace patentholder_id=1000145 if substances=="Torasemid"replace patentholder_id=1000033 if substances=="Toremifen"replace patentholder_id=1000281 if substances=="Trandolapril"replace patentholder_id=1000223 if substances=="Tropisetron"replace patentholder_id=1000122 if substances=="Zidovudin"sort patentholder_idegen patentholder_no=group(patentholder_id)sum patentholder_nodrop generic_entry pzn_generic_entry sub_no_gentry sub_no_joint compresssave npi_human3.dta, replace*Extract substances and patentholders (75 drug markets with LoE)keep patentholder_no patentholder_id  drop if patentholder_no== .duplicates dropcountrename patentholder_id konz_idgen patentholder_no2=patentholder_nosort konz_idsave npi_pholder.dta, replaceuse npi_human3.dta, clearkeep sub_no_gentry_exp substances patentholder_id patentholder_no date_expiry* drop if sub_no_gentry_exp== .duplicates dropcountsort patentholder_nosave npi_drug.dta, replace*Tradename(s) 73 drug markets (part of analysis)keep sub_no_gentry_exp substancesgen tradename1=""replace tradename1="Cambral" if sub_no_gentry_exp==1replace tradename1="Differin" if sub_no_gentry_exp==2replace tradename1="Xatral" if sub_no_gentry_exp==3replace tradename1="Solian" if sub_no_gentry_exp==4replace tradename1="Norvasc" if sub_no_gentry_exp==5replace tradename1="Loceryl" if sub_no_gentry_exp==6replace tradename1="Zithromax" if sub_no_gentry_exp==7replace tradename1="Cibacen" if sub_no_gentry_exp==8replace tradename1="Dostinex" if sub_no_gentry_exp==9replace tradename1="Daivonex" if sub_no_gentry_exp==10replace tradename1="Carmubris" if sub_no_gentry_exp==11replace tradename1="Dilatrend" if sub_no_gentry_exp==12replace tradename1="Suprax" if sub_no_gentry_exp==13replace tradename1="Orelox" if sub_no_gentry_exp==14replace tradename1="Fortum" if sub_no_gentry_exp==15replace tradename1="Cedax" if sub_no_gentry_exp==16replace tradename1="Rocephin" if sub_no_gentry_exp==17replace tradename1="Dynorm" if sub_no_gentry_exp==18replace tradename1="Cipramil" if sub_no_gentry_exp==19replace tradename1="Biaxin" if sub_no_gentry_exp==20replace tradename1="Pilzcin" if sub_no_gentry_exp==21replace tradename1="Ebastel" if sub_no_gentry_exp==23replace tradename1="Eprex " if sub_no_gentry_exp==24replace tradename1="Telfast" if sub_no_gentry_exp==25replace tradename1="Neupogen" if sub_no_gentry_exp==26replace tradename1="Propecia" if sub_no_gentry_exp==27replace tradename1="Quinodis" if sub_no_gentry_exp==28replace tradename1="Diflucan" if sub_no_gentry_exp==29replace tradename1="Anexate" if sub_no_gentry_exp==30replace tradename1="Fosinorm" if sub_no_gentry_exp==31replace tradename1="Neurontin" if sub_no_gentry_exp==32replace tradename1="Cymeven" if sub_no_gentry_exp==33replace tradename1="Amaryl" if sub_no_gentry_exp==34replace tradename1="Kevatril" if sub_no_gentry_exp==35replace tradename1="Sempera" if sub_no_gentry_exp==36replace tradename1="Motens" if sub_no_gentry_exp==37replace tradename1="Lamictal" if sub_no_gentry_exp==38replace tradename1="Agopton" if sub_no_gentry_exp==39replace tradename1="Enantone" if sub_no_gentry_exp==40replace tradename1="Mevinacor" if sub_no_gentry_exp==41replace tradename1="Mobec" if sub_no_gentry_exp==42replace tradename1="Diastabol" if sub_no_gentry_exp==43replace tradename1="Miltex" if sub_no_gentry_exp==44replace tradename1="Remergil" if sub_no_gentry_exp==45replace tradename1="Leucomax" if sub_no_gentry_exp==46replace tradename1="Cynt" if sub_no_gentry_exp==47replace tradename1="Nadixa" if sub_no_gentry_exp==48replace tradename1="Nefadar" if sub_no_gentry_exp==49replace tradename1="Zyprexa" if sub_no_gentry_exp==50replace tradename1="Zofran" if sub_no_gentry_exp==51replace tradename1="Oxygesic" if sub_no_gentry_exp==52replace tradename1="Taxol" if sub_no_gentry_exp==53replace tradename1="Aredia" if sub_no_gentry_exp==54replace tradename1="Parkotil" if sub_no_gentry_exp==55replace tradename1="Coversum" if sub_no_gentry_exp==56replace tradename1="Mevalotin" if sub_no_gentry_exp==57replace tradename1="Dermatop" if sub_no_gentry_exp==58replace tradename1="Norprolac" if sub_no_gentry_exp==59replace tradename1="Accupro" if sub_no_gentry_exp==60replace tradename1="Delix" if sub_no_gentry_exp==61replace tradename1="Risperdal" if sub_no_gentry_exp==62replace tradename1="Zalain" if sub_no_gentry_exp==63replace tradename1="Zoloft" if sub_no_gentry_exp==64replace tradename1="Zocor" if sub_no_gentry_exp==65replace tradename1="Imigran" if sub_no_gentry_exp==66replace tradename1="Omnic" if sub_no_gentry_exp==67replace tradename1="Temodal" if sub_no_gentry_exp==68replace tradename1="Heitrin" if sub_no_gentry_exp==69replace tradename1="Lamisil" if sub_no_gentry_exp==70replace tradename1="Unat" if sub_no_gentry_exp==71replace tradename1="Fareston" if sub_no_gentry_exp==72replace tradename1="Udrik" if sub_no_gentry_exp==73replace tradename1="Navoban" if sub_no_gentry_exp==74gen tradename2=""replace tradename2=" Uroxatral" if sub_no_gentry_exp==3replace tradename2=" Podomexef" if sub_no_gentry_exp==14replace tradename2=" Keimax" if sub_no_gentry_exp==16replace tradename2=" Sepram" if sub_no_gentry_exp==19replace tradename2=" Klacid" if sub_no_gentry_exp==20replace tradename2=" Proscar" if sub_no_gentry_exp==27replace tradename2=" Solosa" if sub_no_gentry_exp==34replace tradename2=" Lanzor" if sub_no_gentry_exp==39replace tradename2=" Trenantone" if sub_no_gentry_exp==40replace tradename2=" Impavido" if sub_no_gentry_exp==44count if tradename1==""drop if tradename1==""sort sub_no_gentry_expsave npi_drug_tn.dta, replace**** (IV) Regression Variablesuse npi_human3.dta, clear*(1) Drug market level** Pre-entry Revenues (two calendar years prior to Patent Expiry, evaluated at producer prices)  gen double pre_market_size2= .sort sub_no_gentry_expsum sub_no_gentry_exp, dlocal num=r(max)+1local x=1quietly while `x'<`num' {sum date_expiry_yr if sub_no_gentry_exp==`x'local z=r(min)local z2=`z'-2sum marketsize`z2' if sub_no_gentry_exp==`x'local help2=r(max)replace pre_market_size2=`help2' if sub_no_gentry_exp==`x' & pre_market_size2== .local x=`x'+1}sum pre_market_size2, dreplace pre_market_size2=0 if pre_market_size2<0sum pre_market_size2, dgen ln_pre_market_size2=ln(pre_market_size2+1) if sub_no_gentry_exp!= .*ranking pre-entry market size: small, medium, large (dv)egen help1=tag(sub_no_gentry_exp)count if help1==1egen help2=rank(pre_market_size2) if help1==1, fieldby sub_no_gentry_exp, sort: egen rank_size=max(help2)by sub_no_gentry_exp, sort: egen index=max(ind_generic_entry_exp)gen small=cond(rank_size>50 & rank_size<=75,1,0) if sub_no_gentry_exp!= .gen medium=cond(rank_size>25 & rank_size<=50,1,0) if sub_no_gentry_exp!= .gen large=cond(rank_size<=25,1,0) if sub_no_gentry_exp!= .count if help1==1 & small==1count if help1==1 & medium==1count if help1==1 & large==1drop help* rank_size index** Therapeutic Substitutesby sub_no, sort: egen drug_launch=min(date_form_launch)format %td drug_launchgen drug_launch_yr=year(drug_launch)sum drug_launch_yrtab drug_codeby sub_no, sort: egen drug_code2=min(drug_code)tab drug_code2count if date_expiry!= . & drug_code2==3*(i) Off-patent prescription substitute drugs with generic entry (ATC3)gen atc3_rxsubstitutes_g= .sort sub_no_gentry_expsum sub_no_gentry_exp, dlocal num=r(max)+1local x=1quietly while `x'<`num' {sum date_expiry if sub_no_gentry_exp==`x'local expiry=r(min)sum date_expiry_month if sub_no_gentry_exp==`x'local mth=r(min)sum date_expiry_yr if sub_no_gentry_exp==`x'local yr=r(min)sum sub_id if sub_no_gentry_exp==`x'local sub_match=r(mean)sort atc3_noegen index`x'=group(atc3_no) if sub_no_gentry_exp==`x'sum index`x', dlocal num2=r(max)+1local y=1quietly while `y'<`num2' {sum atc3_no if index`x'==`y'local match=r(mean)egen help1_tag_`x'_`y'=tag(sub_no) if atc3_no==`match' & drug_launch<`expiry' & drug_code2!=3 & rx==1 & drug_code==1 & sub_id!=`sub_match' & pprice`mth'_`yr'!= . by sub_no, sort: egen help2_tag_`x'_`y'=max(help1_tag_`x'_`y') if sub_no!= .drop help1*_tag*local y=`y'+1}egen help1`x'=rowmax(help2_tag*)egen help2`x'=group(sub_no) if help1`x'==1egen help3`x'=max(help2`x')sum help3`x'local compete=r(max)sum help3`x'local compete2=r(max)replace atc3_rxsubstitutes_g=`compete' if sub_no_gentry_exp==`x' & atc3_rxsubstitutes_g== .replace atc3_rxsubstitutes_g=0 if sub_no_gentry_exp==`x' & atc3_rxsubstitutes_g== . drop index`x' help*local x=`x'+1}sum atc3_rxsubstitutes_g*(ii) On-patent substitute drugs (ATC3)gen atc3_rxsubstitutes_b= .sort sub_no_gentry_expsum sub_no_gentry_exp, dlocal num=r(max)+1local x=1quietly while `x'<`num' {sum date_expiry if sub_no_gentry_exp==`x'local expiry=r(min)sum date_expiry_month if sub_no_gentry_exp==`x'local mth=r(min)sum date_expiry_yr if sub_no_gentry_exp==`x'local yr=r(min)sum sub_id if sub_no_gentry_exp==`x'local sub_match=r(mean)sort atc3_noegen index`x'=group(atc3_no) if sub_no_gentry_exp==`x'sum index`x', dlocal num2=r(max)+1local y=1quietly while `y'<`num2' {sum atc3_no if index`x'==`y'local match=r(mean)egen help1_tag_`x'_`y'=tag(sub_no) if atc3_no==`match' & drug_launch<`expiry' & drug_code2==3 & rx==1 & sub_id!=`sub_match' & pprice`mth'_`yr'!= . by sub_no, sort: egen help2_tag_`x'_`y'=max(help1_tag_`x'_`y') if sub_no!= .drop help1*_tag*local y=`y'+1}egen help1`x'=rowmax(help2_tag*)egen help2`x'=group(sub_no) if help1`x'==1egen help3`x'=max(help2`x')sum help3`x'local compete=r(max)sum help3`x'local compete2=r(max)replace atc3_rxsubstitutes_b=`compete' if sub_no_gentry_exp==`x' & atc3_rxsubstitutes_b== .replace atc3_rxsubstitutes_b=0 if sub_no_gentry_exp==`x' & atc3_rxsubstitutes_b== . drop index`x' help*local x=`x'+1}sum atc3_rxsubstitutes_bsave npi_human4.dta, replace*(2) Originatorsort konz_idmerge konz_id using npi_pholder.dtatab _mdrop _mtab patentholder_notab patentholder_no2**(i) Drug pipeline (human medicines)gen subsidiary=0 if patentholder_no2!= .replace subsidiary=1 if subsidiary==0 & producer=="1A Pharma"replace subsidiary=1 if subsidiary==0 & producer=="AWD.Pharma"replace subsidiary=1 if subsidiary==0 & producer=="Azupharma"replace subsidiary=1 if subsidiary==0 & producer=="Hexal"replace subsidiary=1 if subsidiary==0 & producer=="Hexal/Emmerich"replace subsidiary=1 if subsidiary==0 & producer=="Merck Dura" & parent=="Merck KGaA"replace subsidiary=1 if subsidiary==0 & producer=="Sandoz"replace subsidiary=1 if subsidiary==0 & producer=="Salutas Pharma"replace subsidiary=1 if subsidiary==0 & producer=="Winthrop"by sub_no, sort: egen help=min(date_form_launch) if patentholder_no2!= . & subsidiary==0by sub_no, sort: egen date_alllaunch_orig=min(help) if patentholder_no2!= .format date_alllaunch_orig %tddrop helpgen pipeline= .sort sub_no_gentry_expsum sub_no_gentry_exp, dlocal num=r(max)+1local x=1quietly while `x'<`num' {sum date_expiry if sub_no_gentry_exp==`x'local expiry=r(min)sum date_expiry_month if sub_no_gentry_exp==`x'local mth=r(min)sum date_expiry_yr if sub_no_gentry_exp==`x'local yr=r(min)sum patentholder_no if sub_no_gentry_exp==`x' local match1=r(mean)sum sub_no if sub_no_gentry_exp==`x'local match2=r(mean)egen help1a_tag`x'=tag(sub_no) if patentholder_no2==`match1' & sub_no!=`match2' & drug_launch<`expiry' & date_alllaunch_orig<`expiry' & subsidiary==0 & pprice`mth'_`yr'!= .egen help2a`x'=total(help1a_tag`x') replace pipeline=help2a`x' if sub_no_gentry_exp==`x' &  pipeline== .drop help* local x=`x'+1}sum pipelinecompresssave npi_human4.dta, replace**(ii) Activity non-core business (outside of human medicine business)use npi_hist_clean.dta, clearkeep hersteller konzern substanzen produkt zusatzklasse einfuehrung pzn pzn_id_mod atc* nfc* konz_idreplace einfuehrung= . if einfuehrung== -309777*equivalent to 11.11.1111 (date not available)rename hersteller producerrename konzern parentrename substanzen substancesrename produkt productrename zusatzklasse drug_classrename einfuehrung date_form_launchformat date_form_launch %tdreplace parent="L'Oreal + Nestle" if konz_id==1000385replace parent="Alcon + Nestle" if konz_id==1000356duplicates droptab drug_classgen drug_class_mod=drug_classreplace drug_class_mod="Other" if drug_class_mod=="Randsortiment in W1X"replace drug_class_mod="Other" if drug_class_mod=="Randsortiment mit ATC"gen sub_help=0replace sub_help=1 if substances=="Acamprosat" | substances=="Adapalen" | substances=="Alfuzosin" | substances=="Amlodipin" | substances=="Amorolfin" | substances=="Apraclonidin" | substances=="Azithromycin" | substances=="Benazepril" | substances=="Cabergolin" | substances=="Calcipotriol" |substances=="Carmustin" | substances=="Cefpodoxim" | substances=="Ceftibuten" | substances=="Cilazapril" | substances=="Clarithromycin" | substances=="Croconazol" | substances=="Didanosin" | substances=="Ebastin" | substances=="Epoetin alfa" | substances=="Fexofenadin" | substances=="Filgrastim" | substances=="Finasterid" | substances=="Fleroxacin" | substances=="Fosinopril" | substances=="Glimepirid" | substances=="Lacidipin" | substances=="Lamotrigin" | substances=="Lansoprazol" | substances=="Leuprorelin" | substances=="Miglitol" replace sub_help=1 if substances=="Miltefosin" | substances=="Molgramostim" | substances=="Nadifloxacin" | substances=="Nafarelin" | substances=="Nefazodon" | substances=="Olanzapin" | substances=="Ondansetron" | substances=="Perindopril" | substances=="Pravastatin" | substances=="Quinagolid" | substances=="Ramipril" | substances=="Risperidon" | substances=="Sertaconazol" | substances=="Sertralin" | substances=="Sevofluran" | substances=="Sumatriptan" | substances=="Tamsulosin" | substances=="Temozolomid" | substances=="Terbinafin" | substances=="Toremifen" | substances=="Trandolapril" | substances=="Tropisetron" | substances=="Zidovudin" replace sub_help=1 if substances=="Carvedilol" | substances=="Cefixim" | substances=="Fluconazol" | substances=="Formoterol" | substances=="Itraconazol" | substances=="Lovastatin" | substances=="Meloxicam" | substances=="Moxonidin" | substances=="Pergolid" | substances=="Quinapril" | substances=="Simvastatin" | substances=="Amisulprid" | substances=="Ceftazidim" | substances=="Ceftriaxon" | substances=="Citalopram" | substances=="Flumazenil" | substances=="Gabapentin" | substances=="Granisetron" | substances=="Mirtazapin"  | substances=="Oxycodon" |  substances=="Pamidrons�ure" | substances=="Paclitaxel" | substances=="Prednicarbat" | substances=="Terazosin" | substances=="Torasemid" | substances=="Ganciclovir"  *excluded (from analysis): Azithromycin Gabapentin Ondansetron Temozolomid Didanosin Zidovudinsort substancesegen sub_help2=group(substances) if sub_help==1sum sub_help*tab drug_class_mod if sub_help2!= .tab substances if sub_help2!= . & drug_class_mod!="Arzneimittel human"egen sub_no=group(substances)sum sub_no*Identify patentholderssort konz_idmerge konz_id using npi_pholder.dtatab _mkeep if _m==3drop _mtab patentholder_notab patentholder_no2*Identify drugs with LoE (multiple drugs per patentholder =>joinby)sort patentholder_nojoinby patentholder_no using npi_drug.dta, unmatched(both) _merge(_merge) tab _mdrop _m*Date of drug launchby substances, sort: egen drug_launch=min(date_form_launch)format %td drug_launch*Non_core business activity (medical products/substances for non-human use, incl. diagnostics)gen n_drugnewclass1= .sort sub_no_gentry_expsum sub_no_gentry_exp, dlocal num=r(max)+1local x=1quietly while `x'<`num' {sum date_expiry if sub_no_gentry_exp==`x'local expiry=r(min)local expiry1=r(min)-(1*365)sum patentholder_no if sub_no_gentry_exp==`x' local match1=r(mean)egen help`x'=tag(sub_no) if patentholder_no2==`match1' & sub_help2==. & drug_launch>=`expiry1' & drug_launch<`expiry' & drug_class_mod!="Arzneimittel human"egen help_`x'=total(help`x')replace n_drugnewclass1=help_`x' if sub_no_gentry_exp==`x' drop help*local x=`x'+1}keep sub_no_gentry_exp n_drugnewclass1duplicates dropcountsum sub_no_gentry_exp n_drugnewclass1compresssort sub_no_gentry_exp  save npi_non_core_business.dta, replace*Matching of NPI data and information on non-core business activity  use npi_human4.dta, clearsort sub_no_gentry_expmerge sub_no_gentry_exp using npi_non_core_business.dtatab _mdrop _mgen n_drugnewclass1n=100*(n_drugnewclass1/pipeline)sum n_drugnewclass1nsum n_drugnewclass1 pipeline if n_drugnewclass1n== . & sub_no_gentry_exp!= .replace n_drugnewclass1n=0 if n_drugnewclass1n== . & sub_no_gentry_exp!= .sum n_drugnewclass1ncompresssave npi_human4.dta, replace**(iii) Alternative brand strategies*(1) Rx-to-OTC Switch [reimport products included/generics excluded]egen index=tag(sub_no_gentry_exp pzn_id_mod)gen rx_switch= .sort sub_no_gentry_expsum sub_no_gentry_explocal max=r(max)+1local x=1quietly while `x' <`max' {sum date_expiry if sub_no_gentry_exp==`x'local expiry=r(min)by sub_no_gentry_exp, sort: egen help1a`x'=mean(rx) if index==1 & sub_no_gentry_exp==`x' & date_form_launch<=`expiry' & drug_code!=1 by sub_no_gentry_exp, sort: egen help1b`x'=mean(rx) if index==1 & sub_no_gentry_exp==`x' & date_form_launch>`expiry' & date_form_launch!= . & drug_code!=1 by sub_no_gentry_exp, sort: egen help1c`x'=max(help1a`x') if sub_no_gentry_exp==`x' by sub_no_gentry_exp, sort: egen help1d`x'=max(help1b`x') if sub_no_gentry_exp==`x' replace rx_switch=0 if sub_no_gentry_exp==`x'replace rx_switch=1 if sub_no_gentry_exp==`x' & help1c`x'==1 & help1c`x'!=help1d`x'drop help*local x=`x'+1}sum rx_switchtab substances if rx_switch==1 egen help=tag(sub_no) if rx_switch==1count if help==1drop helptab substances if rx_switch==1 *19 drugs prior to LoE*(2) Second Generation Product (SGP) [reimport products/generics excluded]: *Introduction new product with same active ingredientby product, sort: egen help1=min(date_form_launch)by product, sort: egen help2=min(date_launch)gen date_prdlaunch=help1replace date_prdlaunch=help2 if date_prdlaunch== .count if date_prdlaunch== .format %td date_prdlaunchdrop help* indexgen sgp= .gen sgp1= .gen sgp3= .sort sub_no_gentry_expsum sub_no_gentry_explocal max=r(max)+1local x=1quietly while `x' <`max' {sum date_expiry if sub_no_gentry_exp==`x'local expiry=r(min)local expiry1=r(min)-1*365local expiry3=r(min)-3*365egen help1a`x'=tag(product) if sub_no_gentry_exp==`x' & date_prdlaunch<=`expiry' & drug_code!=1 & patentholder_no==patentholder_no2egen help1b`x'=tag(product) if sub_no_gentry_exp==`x' & date_prdlaunch>`expiry' & date_prdlaunch!= . & drug_code!=1 & patentholder_no==patentholder_no2by sub_no_gentry_exp, sort: egen help1c`x'=total(help1a`x') if sub_no_gentry_exp==`x' by sub_no_gentry_exp, sort: egen help1d`x'=total(help1b`x') if sub_no_gentry_exp==`x' replace sgp=0 if sub_no_gentry_exp==`x'replace sgp=1 if sub_no_gentry_exp==`x' & help1c`x'<help1d`x' & help1d`x'!= .egen help2a`x'=tag(product) if sub_no_gentry_exp==`x' & date_prdlaunch<=`expiry1' & drug_code!=1 & patentholder_no==patentholder_no2egen help2b`x'=tag(product) if sub_no_gentry_exp==`x' & date_prdlaunch>`expiry1' & date_prdlaunch!= . & drug_code!=1 & patentholder_no==patentholder_no2by sub_no_gentry_exp, sort: egen help2c`x'=total(help2a`x') if sub_no_gentry_exp==`x' by sub_no_gentry_exp, sort: egen help2d`x'=total(help2b`x') if sub_no_gentry_exp==`x' replace sgp1=0 if sub_no_gentry_exp==`x'replace sgp1=1 if sub_no_gentry_exp==`x' & help2c`x'<help2d`x' & help2d`x'!= .egen help3a`x'=tag(product) if sub_no_gentry_exp==`x' & date_prdlaunch<=`expiry3' & drug_code!=1 & patentholder_no==patentholder_no2egen help3b`x'=tag(product) if sub_no_gentry_exp==`x' & date_prdlaunch>`expiry3' & date_prdlaunch!= . & drug_code!=1 & patentholder_no==patentholder_no2by sub_no_gentry_exp, sort: egen help3c`x'=total(help3a`x') if sub_no_gentry_exp==`x' by sub_no_gentry_exp, sort: egen help3d`x'=total(help3b`x') if sub_no_gentry_exp==`x' replace sgp3=0 if sub_no_gentry_exp==`x'replace sgp3=1 if sub_no_gentry_exp==`x' & help3c`x'<help3d`x' & help3d`x'!= .drop help*local x=`x'+1}sum sgp*tab substances if sgp==1 tab substances if sgp1==1 tab substances if sgp3==1 replace sgp=0 if substances=="Acamprosat"replace sgp1=0 if substances=="Acamprosat"replace sgp3=0 if substances=="Acamprosat"*only one product - no further product launched (manual check)replace sgp=0 if substances=="Nadifloxacin"replace sgp1=0 if substances=="Nadifloxacin"replace sgp3=0 if substances=="Nadifloxacin"*only one product - no further product launched (manual check)*Introduction new product (same active ingredient) under new (similar) tradename (tradename info available for 73 drugs that are part of analysis)sort sub_no_gentry_expmerge sub_no_gentry_exp using npi_drug_tn.dtatab _mdrop _m local varlist sgp_inn sgp_tn sgp1_inn sgp1_tn sgp3_inn sgp3_tn foreach var in `varlist' {gen `var'= .}sort sub_no_gentry_expsum sub_no_gentry_explocal max=r(max)+1local x=1quietly while `x' <`max' {sum date_expiry if sub_no_gentry_exp==`x'local expiry=r(min)local expiry1=r(min)-1*365local expiry3=r(min)-3*365sum patentholder_no if sub_no_gentry_exp==`x'local holder=r(min)gen help_sub`x'=substances if sub_no_gentry_exp==`x'gsort -help_sub`x'replace help_sub`x'=help_sub`x'[_n-1] if help_sub`x'=="" & help_sub`x'[_n-1]!=""gen help_tn`x'=tradename1 if sub_no_gentry_exp==`x'gsort -help_tn`x'replace help_tn`x'=help_tn`x'[_n-1] if help_tn`x'=="" & help_tn`x'[_n-1]!=""gen inn`x'=regexm(substances,help_sub`x')gen tn`x'=regexm(product,help_tn`x')egen help1a`x'=tag(product) if sub_no_gentry_exp!=`x' & inn`x'==1 & date_prdlaunch>`expiry' & drug_code!=1 & patentholder_no2==`holder'egen help1b`x'=tag(product) if sub_no_gentry_exp!=`x' & tn`x'==1 & date_prdlaunch>`expiry' & drug_code!=1 & patentholder_no2==`holder'egen help2a`x'=max(help1a`x') egen help2b`x'=max(help1b`x') replace sgp_inn=0 if sub_no_gentry_exp==`x'replace sgp_tn=0 if sub_no_gentry_exp==`x'replace sgp_inn=1 if sub_no_gentry_exp==`x' & help2a`x'==1replace sgp_tn=1 if sub_no_gentry_exp==`x' & help2b`x'==1 egen help3a`x'=tag(product) if sub_no_gentry_exp!=`x' & inn`x'==1 & date_prdlaunch>`expiry1' & drug_code!=1 & patentholder_no2==`holder' egen help3b`x'=tag(product) if sub_no_gentry_exp!=`x' & tn`x'==1 & date_prdlaunch>`expiry1' & drug_code!=1 & patentholder_no2==`holder'egen help4a`x'=max(help3a`x') egen help4b`x'=max(help3b`x') replace sgp1_inn=0 if sub_no_gentry_exp==`x'replace sgp1_tn=0 if sub_no_gentry_exp==`x'replace sgp1_inn=1 if sub_no_gentry_exp==`x' & help4a`x'==1replace sgp1_tn=1 if sub_no_gentry_exp==`x' & help4b`x'==1 egen help5a`x'=tag(product) if sub_no_gentry_exp!=`x' & inn`x'==1 & date_prdlaunch>`expiry3' & drug_code!=1 & patentholder_no2==`holder'egen help5b`x'=tag(product) if sub_no_gentry_exp!=`x' & tn`x'==1 & date_prdlaunch>`expiry3' & drug_code!=1 & patentholder_no2==`holder'egen help6a`x'=max(help5a`x') egen help6b`x'=max(help5b`x') replace sgp3_inn=0 if sub_no_gentry_exp==`x'replace sgp3_tn=0 if sub_no_gentry_exp==`x'replace sgp3_inn=1 if sub_no_gentry_exp==`x' & help6a`x'==1replace sgp3_tn=1 if sub_no_gentry_exp==`x' & help6b`x'==1 drop help* inn`x' tn`x'*local x=`x'+1}sum sgp*_*n*combined sgp indicatorgen sgp_all=0 if sub_no_gentry_exp!= .replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp1==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp3==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp_inn==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp1_inn==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp3_inn==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp_tn==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp1_tn==1replace sgp_all=1 if sub_no_gentry_exp!= . & sgp_all==0 & sgp3_tn==1tab substances if sgp_all==1 *SGP: 6 drugs (Zidovudin, Didanosin not part of analysis)*(3) Cases of patent litigation [based on own research]gen p_lit=0 if sub_no_gentry_exp!= .replace p_lit=1 if sub_no_gentry_exp==3replace p_lit=1 if sub_no_gentry_exp==5replace p_lit=1 if sub_no_gentry_exp==12replace p_lit=1 if sub_no_gentry_exp==50replace p_lit=1 if sub_no_gentry_exp==52replace p_lit=1 if sub_no_gentry_exp==53replace p_lit=1 if sub_no_gentry_exp==65replace p_lit=1 if sub_no_gentry_exp==67tab substances if p_lit==1** Dummy variables: ATC1, NFC1 and Year*ATC1tab atc1_no if sub_no_gentry_exp!= ., gen(atc1_)rename atc1_13 atc1_14 rename atc1_12 atc1_13 rename atc1_11 atc1_12rename atc1_10 atc1_11rename atc1_9 atc1_10rename atc1_8 atc1_9gen atc1_8= .gen atc1_15= .gen atc1_16= .gen atc1_17= .*NFC1tab nfc1_no if sub_no_gentry_exp!= ., gen(nfc1_)rename nfc1_9 nfc1_12 rename nfc1_8 nfc1_11 rename nfc1_7 nfc1_8 rename nfc1_6 nfc1_7 rename nfc1_5 nfc1_6rename nfc1_4 nfc1_5gen nfc1_4= .gen nfc1_9= .gen nfc1_10= .gen nfc1_13= .gen nfc1_14= .gen nfc1_15= .gen nfc1_16= .gen nfc1_17= .gen nfc1_18= .*Most common route of administration (prior to LoE)sum pzn_noby pzn_no, sort: gen index=_n if sub_no_gentry_exp!= .count if index==1by pzn_no, sort: egen check=mean(nfc1_no) if sub_no_gentry_exp!= .tab checkdrop checktab nfc1 if sub_no_gentry_exp==3 & index==1 & date_form_launch<date_expirytab nfc1 if sub_no_gentry_exp==16 & index==1 & date_form_launch<date_expirygen nfc1_route= .tab nfc1_nosort sub_no_gentry_expsum sub_no_gentry_explocal num=r(max)+1local x=1 quietly while `x'<`num' {egen help1`x'=mode(nfc1_no) if sub_no_gentry_exp==`x' & index==1 & date_form_launch<date_expiry, maxmodeby sub_no_gentry_exp, sort: egen help2`x'=max(help1`x')replace nfc1_route=help2`x' if sub_no_gentry_exp==`x'drop help*local x=`x'+1}tab nfc1_routedrop indexgen nfc1_mod=nfc1 if nfc1_route==nfc1_no & sub_no_gentry_exp!= .gsort sub_no_gentry_exp -nfc1_mod replace nfc1_mod=nfc1_mod[_n-1] if nfc1_mod=="" & nfc1_mod[_n-1]!="" & sub_no_gentry_exp==sub_no_gentry_exp[_n-1]tab nfc1_mod if nfc1_route==1 tab nfc1_mod if nfc1_route==2tab nfc1_mod if nfc1_route==5tab nfc1_mod if nfc1_route==6tab nfc1_mod if nfc1_route==11*main route of administration gen oral_dum=0replace oral_dum=1 if nfc1_route==1 | nfc1_route==2gen parenteral_dum=0replace parenteral_dum=1 if nfc1_route==5 | nfc1_route==6gen topical_dum=0replace topical_dum=1 if nfc1_route==11*YEARtab date_expiry_yr if sub_no_gentry_exp!= ., gen(year)local x=1quietly while `x'<7 {local y=`x'+2001rename year`x' year`y'local x=`x'+1}compresssave npi_human4.dta, replace*** end of do file